CC := gcc
AR := ar

# CFLAGS := -I /root/LinuxKernel/c
# CFLAGS += -DADD1

SERVER_TARGET := server
CLIENT_TARGET := client

SERVER_OBJ_LIST := server.o
CLIENT_OBJ_LIST := client.o

all: $(SERVER_TARGET) $(CLIENT_TARGET)

$(SERVER_TARGET): $(SERVER_OBJ_LIST)
	$(CC) $^ -o $@ -static $(STATICLIB)

$(CLIENT_TARGET): $(CLIENT_OBJ_LIST)
	$(CC) $^ -o $@ -static $(STATICLIB)

%.o : %.c 
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -rf $(SERVER_OBJ_LIST) $(CLIENT_OBJ_LIST)
	rm -rf $(SERVER_TARGET) $(CLIENT_TARGET)
